package com.kr.redeye.member;

import java.util.HashMap;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.kr.redeye.dto.FunctionTableDto;
import com.kr.redeye.dto.MemberTableDto;

@Service("memberService")
public class MemberService {
	@Resource(name="memberDao")
	private MemberDao memberDao;
	
	public int insert(MemberTableDto param) {
		int checkNo=memberDao.checkMember(param);
		if(checkNo>0){
			return -1;
		}
		else{
			return memberDao.insert(param);
		}
	}
	public MemberTableDto login(MemberTableDto param) {
		return memberDao.checkLogin(param);
		
	}
	public int upd(FunctionTableDto param) {
		return memberDao.upd(param);
	}
	
	public int del(FunctionTableDto param) {
		return memberDao.del(param);
	}
	
	public List<HashMap<String, String>> getList(FunctionTableDto param) {
		return memberDao.getList(param);
	}

	

}
